<template>
  <div>
    <van-tabs animated>
      <van-tab title="标题1">
        <van-swipe :autoplay="3000" lazy-render>
          <van-swipe-item v-for="image in images" :key="image">
            <img :src="image" />
          </van-swipe-item>
        </van-swipe>
      </van-tab>
      <van-tab title="标题2">2</van-tab>
      <van-tab title="标题3">3</van-tab>
    </van-tabs>
  </div>
</template>

<script>
export default {
  setup() {
    const images = [
      require('@/assets/images/1.jpg'),
      'https://img.yzcdn.cn/vant/apple-2.jpg',
    ];
    return { images };
  },
};
</script>

<style scoped>
img {
  height: 200px;
  width: 100%;
}
</style>